package cn.itsource.romate.api;

import cn.dev33.satoken.annotation.SaIgnore;
import cn.itsource.pojo.api.AddLogin;
import cn.itsource.result.R;
import cn.itsource.romate.fallback.LoginFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

/**
 * 📖：beishan
 * 🗓️：2024/3/29 11:17
 * =====================
 * feign接口
 */

@FeignClient(value = "it-fccar-service-uaa",fallbackFactory = LoginFallback.class)
public interface LoginApi {
    @PostMapping("/romate/api/login")
    R addLogin(@RequestBody @Valid AddLogin addLogin);

    @PostMapping("/romate/api/updlogin")
    @SaIgnore
    R updLogin(@RequestParam("id")Long id,@RequestParam("name")String name);
}
